//
// Copyright (C) [2024] Xingyun Integrated Circuit, Inc.
//
// GreenCode was a private technology asset of Xingyun Integrated Circuit， Inc （Confidential）
//  Author: Shawn.Tan
//  Date : 2025.10.28
//
//  History : Initial Version 2025.10.28
//

//
#ifndef Green_VmDirectMapControlBlockGPGPU_H
#define Green_VmDirectMapControlBlockGPGPU_H

#include "VmDirectMapControlBlock.h"

namespace Green {

  /*!
    \class VmDirectMapControlBlockGPGPU
    \brief Base class for GPGPU direct mapping control blocks.
  */
  class VmDirectMapControlBlockGPGPU : public VmDirectMapControlBlock
  {
  public:
    VmDirectMapControlBlockGPGPU(EPrivilegeLevelType elType, EMemBankType memType); //!< Constructor with EL type given.
    ~VmDirectMapControlBlockGPGPU() override = default; //!< Destructor.
    VmDirectMapControlBlockGPGPU& operator=(const VmDirectMapControlBlockGPGPU& rOther) = delete; //!< Copy assignment operator not currently needed.

    Object* Clone() const override { return new VmDirectMapControlBlockGPGPU(*this); } //!< Clone VmDirectMapControlBlockGPGPU object.
    const char* Type() const override { return "VmDirectMapControlBlockGPGPU"; }

    void Setup(Generator* pGen) override; //!< Setup VM Context Parameters.
    void Initialize() override; //!< Initialize VmControlBlock object.
  protected:
    VmDirectMapControlBlockGPGPU(const VmDirectMapControlBlockGPGPU& rOther) = default; //!< Copy constructor.
    uint64 GetMaxPhysicalAddress() const override; //!< Return initial maximum physical address.
  };

}

#endif
